package com.ruoyi.question.domain;

import com.ruoyi.common.json.JSONObject;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.core.domain.BaseEntity;
import java.util.Date;

/**
 * 文件表 sys_df_file
 * 
 * @author ruoyi
 * @date 2019-09-10
 */
public class DfFile extends BaseEntity
{
	private static final long serialVersionUID = 1L;
	
	/**  */
	private Long id;
	/** 问题id */
	private Long questionId;
	/** 文件id */
	private String fileId;
	/** 扩展名 */
	private String fileType;
	/** 文件名 */
	private String fileName;
	/** 文件来源(1,问题,2.解答) */
	private String fileSource;
	/**  */
	private Date createtime;
	/**  */
	private String isdelete;

	public void setId(Long id)
	{
		this.id = id;
	}

	public Long getId() 
	{
		return id;
	}
	public void setQuestionId(Long questionId) 
	{
		this.questionId = questionId;
	}

	public Long getQuestionId() 
	{
		return questionId;
	}
	public void setFileId(String fileId) 
	{
		this.fileId = fileId;
	}

	public String getFileId() 
	{
		return fileId;
	}
	public void setFileType(String fileType) 
	{
		this.fileType = fileType;
	}

	public String getFileType() 
	{
		return fileType;
	}
	public void setFileName(String fileName) 
	{
		this.fileName = fileName;
	}

	public String getFileName() 
	{
		return fileName;
	}
	public void setFileSource(String fileSource) 
	{
		this.fileSource = fileSource;
	}

	public String getFileSource() 
	{
		return fileSource;
	}
	public void setCreatetime(Date createtime) 
	{
		this.createtime = createtime;
	}

	public Date getCreatetime() 
	{
		return createtime;
	}
	public void setIsdelete(String isdelete) 
	{
		this.isdelete = isdelete;
	}

	public String getIsdelete() 
	{
		return isdelete;
	}

    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("questionId", getQuestionId())
            .append("fileId", getFileId())
            .append("fileType", getFileType())
            .append("fileName", getFileName())
            .append("fileSource", getFileSource())
            .append("createtime", getCreatetime())
            .append("isdelete", getIsdelete())
            .toString();
    }

    public DfFile(){}
	public DfFile(JSONObject jsonect){

		this.fileId=jsonect.getStr("fileId");
		this.fileName=jsonect.getStr("fileName");
		this.fileType=jsonect.getStr("fileType");
		this.fileSource=jsonect.getStr("fileSource");
		this.createtime=new Date();
	}
}
